diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 0c4e781..48d66c8 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -45,7 +45,7 @@
 	 * @param	string	can be "object" or "array"
 	 * @return	mixed	either a result object or array
 	 */
-	function result($type = 'object')
+	public function result($type = 'object')
 	{
 		if ($type == 'array') return $this->result_array();
 		else if ($type == 'object') return $this->result_object();
@@ -60,7 +60,7 @@
 	 * @param class_name A string that represents the type of object you want back
 	 * @return array of objects
 	 */
-	function custom_result_object($class_name)
+	public function custom_result_object($class_name)
 	{
 		if (array_key_exists($class_name, $this->custom_result_object))
 		{
@@ -79,12 +79,12 @@
 		while ($row = $this->_fetch_object())
 		{
 			$object = new $class_name();
-			
+
 			foreach ($row as $key => $value)
 			{
 				$object->$key = $value;
 			}
-			
+
 			$result_object[] = $object;
 		}
 
@@ -100,7 +100,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function result_object()
+	public function result_object()
 	{
 		if (count($this->result_object) > 0)
 		{
@@ -132,7 +132,7 @@
 	 * @access	public
 	 * @return	array
 	 */
-	function result_array()
+	public function result_array()
 	{
 		if (count($this->result_array) > 0)
 		{
@@ -166,7 +166,7 @@
 	 * @param	string	can be "object" or "array"
 	 * @return	mixed	either a result object or array
 	 */
-	function row($n = 0, $type = 'object')
+	public function row($n = 0, $type = 'object')
 	{
 		if ( ! is_numeric($n))
 		{
@@ -198,7 +198,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function set_row($key, $value = NULL)
+	public function set_row($key, $value = NULL)
 	{
 		// We cache the row data for subsequent uses
 		if ( ! is_array($this->row_data))
@@ -230,7 +230,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function custom_row_object($n, $type)
+	public function custom_row_object($n, $type)
 	{
 		$result = $this->custom_result_object($type);
 
@@ -253,7 +253,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function row_object($n = 0)
+	public function row_object($n = 0)
 	{
 		$result = $this->result_object();
 
@@ -278,7 +278,7 @@
 	 * @access	public
 	 * @return	array
 	 */
-	function row_array($n = 0)
+	public function row_array($n = 0)
 	{
 		$result = $this->result_array();
 
@@ -304,7 +304,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function first_row($type = 'object')
+	public function first_row($type = 'object')
 	{
 		$result = $this->result($type);
 
@@ -323,7 +323,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function last_row($type = 'object')
+	public function last_row($type = 'object')
 	{
 		$result = $this->result($type);
 
@@ -342,7 +342,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function next_row($type = 'object')
+	public function next_row($type = 'object')
 	{
 		$result = $this->result($type);
 
@@ -367,7 +367,7 @@
 	 * @access	public
 	 * @return	object
 	 */
-	function previous_row($type = 'object')
+	public function previous_row($type = 'object')
 	{
 		$result = $this->result($type);
 
@@ -394,14 +394,14 @@
 	 * operational due to the unavailability of the database resource IDs with
 	 * cached results.
 	 */
-	function num_rows() { return $this->num_rows; }
-	function num_fields() { return 0; }
-	function list_fields() { return array(); }
-	function field_data() { return array(); }
-	function free_result() { return TRUE; }
-	function _data_seek() { return TRUE; }
-	function _fetch_assoc() { return array(); }
-	function _fetch_object() { return array(); }
+	public function num_rows() { return $this->num_rows; }
+	public function num_fields() { return 0; }
+	public function list_fields() { return array(); }
+	public function field_data() { return array(); }
+	public function free_result() { return TRUE; }
+	protected function _data_seek() { return TRUE; }
+	protected function _fetch_assoc() { return array(); }
+	protected function _fetch_object() { return array(); }
 
 }
 // END DB_result class
